package com.jd.org.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.jd.basic.domain.BaseDomain;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Employee extends BaseDomain {
//    private Long id;
    private String username;
    private String phone;
    private String email;
    private String salt;
    private String password;
    private Integer age;
    private Integer state = 1;

    private Long department_id;
    private Department department;

    private Long logininfo_id;

    private Long shop_id;

    private Shop shop;


    //方便从中间表中为当前员工添加角色
    private Long role_id;





    //用于封装当前部门的子部门
    //部门树最后一级没有数据就不显示
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Employee> children = new ArrayList<>();
}
